home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / ldapjdk.jar / netscape / ldap / LDAPModificationSet.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-04-13  |  1.1 KB  |  38 lines

  1. package netscape.ldap;
  2.  
  3. import java.util.Vector;
  4.  
  5. public class LDAPModificationSet {
  6.    private int current = 0;
  7.    private Vector modifications = new Vector();
  8.  
  9.    public int size() {
  10.       return this.modifications.size();
  11.    }
  12.  
  13.    public LDAPModification elementAt(int var1) {
  14.       return (LDAPModification)this.modifications.elementAt(var1);
  15.    }
  16.  
  17.    public void removeElementAt(int var1) {
  18.       this.modifications.removeElementAt(var1);
  19.    }
  20.  
  21.    public synchronized void add(int var1, LDAPAttribute var2) {
  22.       LDAPModification var3 = new LDAPModification(var1, var2);
  23.       this.modifications.addElement(var3);
  24.    }
  25.  
  26.    public synchronized void remove(String var1) {
  27.       for(int var2 = 0; var2 < this.modifications.size(); ++var2) {
  28.          LDAPModification var3 = (LDAPModification)this.modifications.elementAt(var2);
  29.          LDAPAttribute var4 = var3.getAttribute();
  30.          if (var1.equalsIgnoreCase(var4.getName())) {
  31.             this.modifications.removeElementAt(var2);
  32.             return;
  33.          }
  34.       }
  35.  
  36.    }
  37. }
  38.